<template>
  <div>
    <h1>vue3语法</h1>
    <h2>{{ msg }}</h2>
    <h2>{{ num }}</h2>
    <button @click="add">+</button>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  data() {
    return {
      msg: "123",
      num: 0,
    };
  },
  methods: {
    add() {
      this.num += 1;
    },
  },
});
</script>

<style scoped>
</style>